﻿using System;
using Dsl.Ped.Framework.Common;

namespace Dsl.Ped.Desktop.Messages
{
    /// <summary>
    /// Message that request the creation of a new file
    /// </summary>
    public class NewFileMessage
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="NewFileMessage"/> class.
        /// </summary>
        /// <param name="fileType">Projective type of a file we want to create</param>
        public NewFileMessage(Type fileType)
        {
            this.FileType = fileType;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="NewFileMessage"/> class.
        ///  </summary>
        /// <param name="fileType">Projective type of a file we want to create</param>
        /// <param name="defaultObject">Default projective object used for the creation</param>
        public NewFileMessage(Type fileType, IProjective defaultObject)
        {
            this.FileType = fileType;
            this.DefaultObject = defaultObject;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="NewFileMessage"/> class.
        /// </summary>
        public NewFileMessage()
        {
            this.FileType = null;
        }

        /// <summary>
        /// Projective type of a file to be created
        /// </summary>
        public Type FileType { get; private set; }

        /// <summary>
        /// Default projective object used for creation
        /// </summary>
        public IProjective DefaultObject { get; private set; }
    }
}
